import request from "@/utils/request";
import { adminUrl, studentUrl, teacherUrl } from "@/utils/baseUrl.js";
// 创建群组管理
export function createRoleGroup(data) {
  return request({
    url: adminUrl + "/system/role-group/create",
    method: "post",
    data: data,
  });
}

// 更新群组管理
export function updateRoleGroup(data) {
  return request({
    url: adminUrl + "/system/role-group/update",
    method: "put",
    data: data,
  });
}

// 删除群组管理
export function deleteRoleGroup(id) {
  return request({
    url: adminUrl + "/system/role-group/delete?id=" + id,
    method: "delete",
  });
}

// 获得群组管理
export function getRoleGroup(id) {
  return request({
    url: adminUrl + "/system/role-group/get?id=" + id,
    method: "get",
  });
}

// 获得群组管理分页
export function getRoleGroupPage(query) {
  return request({
    url: adminUrl + "/system/role-group/page",
    method: "get",
    params: query,
  });
}

// 导出群组管理 Excel
export function exportRoleGroupExcel(query) {
  return request({
    url: adminUrl + "/system/role-group/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
